KFbxScene Class Reference

#include <kfbxscene.h>
Inheritance diagram for KFbxScene:
Inheritance graph
[legend]

List of all members.


Detailed Description

This class contains the description of a complete 3D scene.

The FBX SDK requires unique names for nodes, textures, materials, generic nodes, videos and gobos contained in a given scene. To build a valid node tree, new nodes must be inserted under the scene's root node.

This class also provides access to global settings and take information.

Definition at line 92 of file kfbxscene.h.


Node Tree Access

KFbxNode GetRootNode () const
  Get the root node.
void  FillNodeArray (KArrayTemplate< KFbxNode * > &pNodeArray, kFbxClassId classId, bool pDepthFirst=false)
  Fill a node array will all existing node with a given node attribute type.

Texture Material and Video Access

void  FillTextureArray (KArrayTemplate< KFbxTexture * > &pTextureArray)
  Clear then fill a texture array with all existing textures included in the scene.
void  FillMaterialArray (KArrayTemplate< KFbxSurfaceMaterial * > &pMaterialArray)
  Clear then fill a material array with all existing materials included in the scene.

Generic Node Access

int  GetGenericNodeCount ()
  Get number of generic nodes.
KFbxGenericNode GetGenericNode (int pIndex)
  Get generic node at given index.
KFbxGenericNode GetGenericNode (char *pName)
  Access a generic node from its name.
bool  AddGenericNode (KFbxGenericNode *pGenericNode)
  Add the generic node to this scene.
bool  RemoveGenericNode (KFbxGenericNode *pGenericNode)
  Remove the generic node from this scene.

Character Management

int  GetCharacterCount ()
  Get number of characters.
KFbxCharacter GetCharacter (int pIndex)
  Get character at given index.
int  CreateCharacter (char *pName)
  Create a new character.
void  DestroyCharacter (int pIndex)
  Destroy character.

ControlSetPlug Management

int  GetControlSetPlugCount ()
  Get number of ControlSetPlugs.
KFbxControlSetPlug GetControlSetPlug (int pIndex)
  Get ControlSetPlug at given index.
int  CreateControlSetPlug (char *pName)
  Create a new ControlSetPlug.
void  DestroyControlSetPlug (int pIndex)
  Destroy ControlSetPlug.

Character Pose Management

int  GetCharacterPoseCount ()
  Get number of character poses.
KFbxCharacterPose GetCharacterPose (int pIndex)
  Get character pose at given index.
int  CreateCharacterPose (char *pName)
  Create a new character pose.
void  DestroyCharacterPose (int pIndex)
  Destroy character pose.

Pose Management

int  GetPoseCount ()
  Get number of poses.
KFbxPose GetPose (int pIndex)
  Get pose at given index.
bool  AddPose (KFbxPose *pPose)
  Add a pose to this scene.
bool  RemovePose (KFbxPose *pPose)
  Remove the specified pose from the scene.
bool  RemovePose (int pIndex)
  Remove the pose at the given index from the scene.

Scene information

KFbxDocumentInfo GetSceneInfo ()
  Get the scene information.
void  SetSceneInfo (KFbxDocumentInfo *pSceneInfo)
  Set the scene information.

Global Settings

KFbxGlobalLightSettings GetGlobalLightSettings ()
  Access global light settings.
KFbxGlobalCameraSettings GetGlobalCameraSettings ()
  Access global camera settings.
KFbxGlobalTimeSettings GetGlobalTimeSettings ()
  Access global time settings.
KFbxGlobalSettings GetGlobalSettings ()
  Access global settings.
const KFbxGlobalSettings GetGlobalSettings () const
  Const access to global settings.

Public Member Functions

void  Clear ()
  Delete the node tree below the root node and restore default settings.

Member Function Documentation

void Clear (  )  [virtual]

Delete the node tree below the root node and restore default settings.

Reimplemented from KFbxDocument.

KFbxNode* GetRootNode (  )  const

Get the root node.

Returns:
Pointer to the root node.
Remarks:
This node is not saved. Do not use it to apply a global transformation to the node hierarchy. If a global transformation must be applied, insert a new node below this one.

void FillNodeArray ( KArrayTemplate< KFbxNode * > &  pNodeArray,
kFbxClassId  classId,
bool  pDepthFirst = false  
)

Fill a node array will all existing node with a given node attribute type.

Parameters:
pNodeArray  An array of pointers to KFbxNode objects.
classId  Node class id searched.
pDepthFirst  If true, the node tree is scanned depth first.
Remarks:
Scans the node hierarchy to find all existing node with a given node attribute type. The array of pointers is cleared before scanning the node hierarchy.

void FillTextureArray ( KArrayTemplate< KFbxTexture * > &  pTextureArray  ) 

Clear then fill a texture array with all existing textures included in the scene.

Parameters:
pTextureArray  An array of texture pointers.

void FillMaterialArray ( KArrayTemplate< KFbxSurfaceMaterial * > &  pMaterialArray  ) 

Clear then fill a material array with all existing materials included in the scene.

Parameters:
pMaterialArray  An array of material pointers.

int GetGenericNodeCount (  ) 

Get number of generic nodes.

Returns:
Number of Generic Nodes in this scene.

KFbxGenericNode* GetGenericNode ( int  pIndex  ) 

Get generic node at given index.

Parameters:
pIndex  Position in the list of the generic nodes.
Returns:
Pointer to the generic node or NULL if the index is out of bounds.

KFbxGenericNode* GetGenericNode ( char *  pName  ) 

Access a generic node from its name.

Parameters:
pName 
Returns:
found generic node

bool AddGenericNode ( KFbxGenericNode pGenericNode  ) 

Add the generic node to this scene.

Parameters:
pGenericNode  Pointer to the generic node to be added.
Returns:
If the passed parameter is NULL, this method will return false otherwise true.

bool RemoveGenericNode ( KFbxGenericNode pGenericNode  ) 

Remove the generic node from this scene.

Parameters:
pGenericNode  Pointer to the generic node to be removed.
Returns:
If the passed parameter is NULL, this method will return false otherwise true.
Remarks:
The pointed object is not referenced by the scene anymore but is not deleted from the system.

int GetCharacterCount (  ) 

Get number of characters.

Returns:
Number of characters in this scene.

KFbxCharacter* GetCharacter ( int  pIndex  ) 

Get character at given index.

Parameters:
pIndex  Position in the list of the characters.
Returns:
Pointer to the character or NULL if index is out of bounds.

int CreateCharacter ( char *  pName  ) 

Create a new character.

Parameters:
pName  Name given to character.
Returns:
Index of the created character.

void DestroyCharacter ( int  pIndex  ) 

Destroy character.

Parameters:
pIndex  Specify which character to destroy.
Remarks:
After the destruction of the requested element the list is resized.

int GetControlSetPlugCount (  ) 

Get number of ControlSetPlugs.

Returns:
Number of ControlSet plugs in this scene.

KFbxControlSetPlug* GetControlSetPlug ( int  pIndex  ) 

Get ControlSetPlug at given index.

Parameters:
pIndex  Position in the list of the ControlSetPlug
Returns:
Pointer to ControlSetPlug or NULL if index is out of bounds.

int CreateControlSetPlug ( char *  pName  ) 

Create a new ControlSetPlug.

Parameters:
pName  Name given to ControlSetPlug.
Returns:
Index of created ControlSetPlug.

void DestroyControlSetPlug ( int  pIndex  ) 

Destroy ControlSetPlug.

Parameters:
pIndex  Specify which ControlSetPlug to destroy.
Remarks:
After the destruction of the requested element the list is resized.

int GetCharacterPoseCount (  ) 

Get number of character poses.

Returns:
Number of character poses in this scene.
Remarks:
Character Poses and Poses are two distinct entities having their own lists.

KFbxCharacterPose* GetCharacterPose ( int  pIndex  ) 

Get character pose at given index.

Parameters:
pIndex  Position in the list of character poses.
Returns:
Pointer to the character pose or NULL if index is out of bounds.

int CreateCharacterPose ( char *  pName  ) 

Create a new character pose.

Parameters:
pName  Name given to character pose.
Returns:
Index of created character pose.

void DestroyCharacterPose ( int  pIndex  ) 

Destroy character pose.

Parameters:
pIndex  Specify which character pose to destroy.
Remarks:
After the destruction of the requested element the list is resized.

int GetPoseCount (  ) 

Get number of poses.

Returns:
Number of poses in the scene.
Remarks:
Poses and Character Poses are two distinct entities having their own lists.

KFbxPose* GetPose ( int  pIndex  ) 

Get pose at given index.

Parameters:
pIndex  Position in the list of poses.
Returns:
Pointer to the pose or NULL if index is out of bounds.

bool AddPose ( KFbxPose pPose  ) 

Add a pose to this scene.

Parameters:
pPose  The pose to be added to the scene.
Returns:
If the pose is correctly added to the scene, return true otherwise, if the pose is already in the scene, returns false.

bool RemovePose ( KFbxPose pPose  ) 

Remove the specified pose from the scene.

Parameters:
pPose  The pose to be removed from the scene.
Returns:
If the pose was successfully removed from the scene, return true otherwise, if the pose could not be found returns false.

bool RemovePose ( int  pIndex  ) 

Remove the pose at the given index from the scene.

Parameters:
pIndex  The zero-based index of the pose to be removed.
Returns:
If the pose was successfully removed from the scene, return true otherwise, if the pose could not be found returns false.

KFbxDocumentInfo* GetSceneInfo (  )  [inline]

Get the scene information.

Returns:
Pointer to the scene information object.

Definition at line 320 of file kfbxscene.h.

References KFbxDocument::GetDocumentInfo().

void SetSceneInfo ( KFbxDocumentInfo pSceneInfo  )  [inline]

Set the scene information.

Parameters:
pSceneInfo  Pointer to the scene information object.

Definition at line 325 of file kfbxscene.h.

References KFbxDocument::SetDocumentInfo().

KFbxGlobalLightSettings& GetGlobalLightSettings (  ) 

Access global light settings.

Returns:
Reference to the Global Light Settings.

KFbxGlobalCameraSettings& GetGlobalCameraSettings (  ) 

Access global camera settings.

Returns:
Reference to the Global Camera Settings.

KFbxGlobalTimeSettings& GetGlobalTimeSettings (  ) 

Access global time settings.

Returns:
Reference to the Global Time Settings.

KFbxGlobalSettings& GetGlobalSettings (  ) 

Access global settings.

Returns:
Reference to the Global Settings.

const KFbxGlobalSettings& GetGlobalSettings (  )  const

Const access to global settings.

Returns:
Const reference to the Global Settings.
KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene
KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene KFbxScene